define('framework/control/GillionTrimDirectiveConstructor', function () {
    return function () {
        return {
            restrict: 'A',
            link: function (scope, element, attrs) {
                element.on('blur', function () {
                    var gTrim = attrs.gTrim;
                    if(gTrim!==undefined){
                        if(gTrim==="ltrim"){
                            element.val(element.val().replace(/^\s+/,""));
                        }else if(gTrim==="rtrim"){
                            element.val(element.val().replace(/\s+$/g,""));
                        }else if(gTrim==="" || gTrim==="trim"){
                            element.val(element.val().replace(/^\s+|\s+$/g,""));
                        }
                    }
                });
            }
        }
    }
});